package com.yy.wga.user.service.controller;

import com.yy.wga.common.core.dto.Result;
import com.yy.wga.user.feign.api.UserRelationFeign;
import com.yy.wga.user.feign.request.UserRelationListReq;
import com.yy.wga.user.feign.response.UserRelationListResp;
import com.yy.wga.user.service.service.UserRelationService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * 用户粉丝关系
 *
 * @author guochao
 * @since 2024-12-10 22:41:43
 */
@RestController
@RequestMapping(value = "/api/user/relation/")
public class UserRelationController implements UserRelationFeign {
    @Resource
    private UserRelationService userRelationService;

    @Override
    @PostMapping("list")
    public Result<List<UserRelationListResp>> list(@RequestBody @Valid UserRelationListReq request) {
        return Result.success(userRelationService.listData(request));
    }
}
